import os
## Set directory
os.chdir('/hpc/group/pbenfeylab/CheWei/CW_data/genesys')
import networkx as nx
from genesys_evaluate import *
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import warnings
# Suppress all warning messages
warnings.filterwarnings("ignore", category=DeprecationWarning)
## Conda Env pytorch-gpu on DCC
print(torch.__version__)
print(sc.__version__)
1.13.0.post200 1.9.1
## Genes considered/used (shared among samples)
gene_list = pd.read_csv('./gene_list_1108.csv')
with open("./genesys_root_data.pkl", 'rb') as file_handle:
data = pickle.load(file_handle)
batch_size = 2000
dataset = Root_Dataset(data['X_test'], data['y_test'])
loader = DataLoader(dataset,
batch_size = batch_size,
shuffle = True, drop_last=True)
input_size = data['X_train'].shape[1]
## 10 cell types
output_size = 10
embedding_dim = 256
hidden_dim = 256
n_layers = 2
device = "cpu"
path = "./"
model = ClassifierLSTM(input_size, output_size, embedding_dim, hidden_dim, n_layers).to(device)
model.load_state_dict(torch.load(path+"best_ALL_1130_continue.pth", map_location=torch.device('cpu')))
model = model
model.eval()
ClassifierLSTM(
(fc1): Sequential(
(0): Linear(in_features=17513, out_features=256, bias=True)
(1): Dropout(p=0.2, inplace=False)
(2): GaussianNoise()
)
(fc): Sequential(
(0): ReLU()
(1): Linear(in_features=512, out_features=512, bias=True)
(2): ReLU()
(3): Linear(in_features=512, out_features=10, bias=True)
)
(lstm): LSTM(256, 256, num_layers=2, batch_first=True, dropout=0.2, bidirectional=True)
(dropout): Dropout(p=0.2, inplace=False)
(b_to_z): DBlock(
(fc1): Linear(in_features=512, out_features=256, bias=True)
(fc2): Linear(in_features=512, out_features=256, bias=True)
(fc_mu): Linear(in_features=256, out_features=512, bias=True)
(fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
)
(bz2_infer_z1): DBlock(
(fc1): Linear(in_features=1024, out_features=256, bias=True)
(fc2): Linear(in_features=1024, out_features=256, bias=True)
(fc_mu): Linear(in_features=256, out_features=512, bias=True)
(fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
)
(z1_to_z2): DBlock(
(fc1): Linear(in_features=512, out_features=256, bias=True)
(fc2): Linear(in_features=512, out_features=256, bias=True)
(fc_mu): Linear(in_features=256, out_features=512, bias=True)
(fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
)
(z_to_x): Decoder(
(fc1): Linear(in_features=512, out_features=256, bias=True)
(fc2): Linear(in_features=256, out_features=256, bias=True)
(fc3): Linear(in_features=256, out_features=17513, bias=True)
)
)
classes = ['Columella', 'Lateral Root Cap', 'Phloem', 'Xylem', 'Procambium', 'Pericycle', 'Endodermis', 'Cortex', 'Atrichoblast', 'Trichoblast']
class2num = {c: i for (i, c) in enumerate(classes)}
num2class = {i: c for (i, c) in enumerate(classes)}
cts = ['Atrichoblast','Trichoblast','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Lateral Root Cap','Columella']
ctw = np.zeros((len(cts), 17513, 17513))
## number of cells sampled from the atlas
batch_size = 2000
## GRN for the transition t1 to t3
for ct in cts:
print(ct)
cws = np.zeros((len(loader), 17513, 17513))
with torch.no_grad():
for i, sample in enumerate(loader):
x = sample['x'].to(device)
y = sample['y'].to(device)
y_label = [num2class[i] for i in y.tolist()]
pred_h = model.init_hidden(batch_size)
tfrom = model.generate_next(x, pred_h, 1).to('cpu').detach().numpy()
cfrom = tfrom[np.where(np.array(y_label)==ct)[0],:]
pred_h = model.init_hidden(batch_size)
tto = model.generate_next(x, pred_h, 3).to('cpu').detach().numpy()
cto = tto[np.where(np.array(y_label)==ct)[0],:]
cw = torch.linalg.lstsq(torch.tensor(cfrom), torch.tensor(cto)).solution.detach().numpy()
cws[i] = cw
## Calculate mean across number of repeats
cwm = np.mean(cws, axis=0)
ctw[cts.index(ct)] = cwm
# Save the array to disk
np.save('genesys_ctw_t1-t3.npy', ctw)
ctw = np.load('genesys_ctw_t1-t3.npy')
## Calculate z-scores
ctw_z = np.zeros((len(cts), 17513, 17513))
for i in range(len(cts)):
ctw_z[i] = (ctw[i] - np.mean(ctw[i])) / np.std(ctw[i])
## Filtering based on z-scores (with no weights)
ctw_f = np.zeros((len(cts), 17513, 17513))
## z-score threshold (keep values > mean + threshold*std)
threshold=3
for i in range(len(cts)):
ctw_f[i] = np.abs(ctw_z[i]) > threshold
wanted_TFs = pd.read_csv("./Kay_TF_thalemine_annotations.csv")
## Make TF names unique and assign preferred names
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G33880"]="WOX9"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G45160"]="SCL27"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G04410"]="NAC78"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G29035"]="ORS1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02540"]="ZHD3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G16500"]="IAA26"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G09740"]="HAG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G24660"]="ZHD2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G46880"]="HDG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G28420"]="RLT1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G14580"]="BLJ"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G45260"]="BIB"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02070"]="RVN"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G28160"]="FIT"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G68360"]="GIS3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G20640"]="NLP4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G05550"]="VFP5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G59470"]="FRF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G15150"]="HAT7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G14750"]="WER"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G75710"]="BRON"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G74500"]="TMO7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G12646"]="RITF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G48100"]="ARR5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G16141"]="GATA17L"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G65640"]="NFL"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G62700"]="VND5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G36160"]="VND2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G66300"]="VND3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G12260"]="VND4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G62380"]="VND6"
pd.Series(wanted_TFs['Name']).value_counts().head(5)
NAC001 1 PRE5 1 MYB118 1 MYB21 1 MYB0 1 Name: Name, dtype: int64
TFidx = []
for i in wanted_TFs['GeneID']:
if i in gene_list['features'].tolist():
TFidx.append(np.where(gene_list['features']==i)[0][0])
TFidx = np.sort(np.array(TFidx))
def network(i):
## No weights
adj_nw = ctw_f[i]
## Weighted
adj = ctw[i]*ctw_f[i]
## TF only
adj = adj[np.ix_(TFidx,TFidx)]
adj_nw = adj_nw[np.ix_(TFidx,TFidx)]
## Remove no connect
regidx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[0]).value_counts().index[pd.Series(np.where(adj_nw==True)[0]).value_counts()>=1]))
taridx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[1]).value_counts().index[pd.Series(np.where(adj_nw==True)[1]).value_counts()>=1]))
## Reciprocol
keepidx = np.sort(np.array(list(set(regidx).intersection(taridx))))
#keepidx = np.sort(np.array(list(set(regidx).union(taridx))))
TFID = np.array(gene_list['features'][TFidx])[keepidx].tolist()
## TF name to keep
TFname = []
for i in np.array(gene_list['features'][TFidx])[keepidx]:
TFname.append(wanted_TFs['Name'][np.where(wanted_TFs['GeneID']==i)[0][0]])
adj = adj[np.ix_(keepidx,keepidx)]
# Create a NetworkX graph for non-directed edges
G = nx.Graph() # supports directed edges and allows for multiple edges between the same pair of nodes
# Add nodes to the graph
num_nodes = adj.shape[0]
for i, name in enumerate(TFname):
G.add_node(i, name=name)
# Add edges to the graph with weights
for i in range(num_nodes):
for j in range(num_nodes):
weight = adj[i, j]
if weight != 0:
G.add_edge(i, j, weight=abs(weight), distance=1/abs(weight))
## Measures the extent to which how close a node is to all other nodes in the network, considering the shortest paths or geodesic distances between nodes
closeness_centrality = nx.closeness_centrality(G, distance='distance')
## Measures the extent to which a node that are not only well-connected but also connected to other well-connected nodes.
eigenvector_centrality = nx.eigenvector_centrality(G)
# Create a NetworkX graph for diected edges
G = nx.MultiDiGraph() # supports directed edges and allows for multiple edges between the same pair of nodes
# Add nodes to the graph
num_nodes = adj.shape[0]
for i, name in enumerate(TFname):
G.add_node(i, name=name)
# Add edges to the graph with weights
for i in range(num_nodes):
for j in range(num_nodes):
weight = adj[i, j]
if weight != 0:
G.add_edge(i, j, weight=weight)
## Measures the number of connections (edges) each node has
degree_centrality = nx.degree_centrality(G)
# Calculate outgoing centrality
out_centrality = nx.out_degree_centrality(G)
# Calculate incoming centrality
in_centrality = nx.in_degree_centrality(G)
## Measures the extent to which a node lies on the shortest paths between other nodes.
betweenness_centrality = nx.betweenness_centrality(G, weight='weight')
## Non_Reciprocal Out centrality
# Visualize the graph
pos = nx.spring_layout(G) # Positions of the nodes
# Node colors based on weighted betweenness centrality
node_colors = [out_centrality[node] for node in G.nodes()]
# Node sizes based on weighted betweenness centrality
node_sizes = [out_centrality[node] * 1000 for node in G.nodes()]
# Get the edge weights as a dictionary
edge_weights = nx.get_edge_attributes(G, 'weight')
edge_colors = ['red' if weight > 0 else 'blue' for (_, _, weight) in G.edges(data='weight')]
# Scale the edge weights to desired linewidths
max_weight = max(edge_weights.values())
edge_widths = [float(edge_weights[edge]) / max_weight for edge in G.edges]
# Draw the graph
nx.draw(G, pos=pos, node_color=node_colors, node_size=node_sizes, with_labels=False, width=edge_widths, edge_color=edge_colors)
# Add node labels
labels = {node: G.nodes[node]['name'] for node in G.nodes}
nx.draw_networkx_labels(G, pos=pos, labels=labels, font_size=8)
# Add a colorbar to show the weighted betweenness centrality color mapping
sm = plt.cm.ScalarMappable(cmap='viridis', norm=plt.Normalize(vmin=min(node_colors), vmax=max(node_colors)))
sm.set_array([])
plt.colorbar(sm)
# Show the plot
plt.show()
dc = pd.DataFrame.from_dict(degree_centrality, orient='index', columns=['degree_centrality'])
oc = pd.DataFrame.from_dict(out_centrality, orient='index', columns=['out_centrality'])
ic = pd.DataFrame.from_dict(in_centrality, orient='index', columns=['in_centrality'])
bc = pd.DataFrame.from_dict(betweenness_centrality, orient='index', columns=['betweenness_centrality'])
cc = pd.DataFrame.from_dict(closeness_centrality, orient='index', columns=['closeness_centrality'])
ec = pd.DataFrame.from_dict(eigenvector_centrality, orient='index', columns=['eigenvector_centrality'])
df = pd.concat([dc,oc,ic,bc,cc,ec], axis=1)
df.index =TFname
df = df.sort_values('betweenness_centrality', ascending=False)
return(df)
atri = network(0)
tri = network(1)
cor = network(2)
end = network(3)
per = network(4)
pro = network(5)
xyl = network(6)
phl = network(7)
lrc = network(8)
col = network(9)
atri.columns = ['atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality']
tri.columns = ['tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality']
cor.columns = ['cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality']
end.columns = ['end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality']
per.columns = ['per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality']
pro.columns = ['pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality']
xyl.columns = ['xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality']
phl.columns = ['phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality']
lrc.columns = ['lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality']
col.columns = ['col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality']
## Indentify main regulators in each net work
tff = []
tff = tff + atri[atri['atri_betweenness_centrality']>0].index.tolist()
tff = tff + tri[tri['tri_betweenness_centrality']>0].index.tolist()
tff = tff + lrc[lrc['lrc_betweenness_centrality']>0].index.tolist()
tff = tff + cor[cor['cor_betweenness_centrality']>0].index.tolist()
tff = tff + end[end['end_betweenness_centrality']>0].index.tolist()
tff = tff + per[per['per_betweenness_centrality']>0].index.tolist()
tff = tff + pro[pro['pro_betweenness_centrality']>0].index.tolist()
tff = tff + xyl[xyl['xyl_betweenness_centrality']>0].index.tolist()
tff = tff + phl[phl['phl_betweenness_centrality']>0].index.tolist()
tff = tff + col[col['col_betweenness_centrality']>0].index.tolist()
tf_occurance = pd.DataFrame(pd.Series(tff).value_counts(), columns=['tf_occurance'])
tf_spec = pd.concat([tf_occurance, atri, tri, lrc, cor, end, per, pro, xyl, phl, col], axis=1)
tf_spec = tf_spec.fillna(0)
## Epidermis (atri, tri, lrc)
celltype1='atri'
celltype2='tri'
celltype3='lrc'
ts = tf_spec[tf_spec['tf_occurance']==3][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==9].sort_values(['centrality_count','centrality_sum'], ascending=False)
| atri_betweenness_centrality | tri_betweenness_centrality | lrc_betweenness_centrality | atri_out_centrality | tri_out_centrality | lrc_out_centrality | atri_in_centrality | tri_in_centrality | lrc_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ATS | 0.911741 | 0.802023 | 0.768044 | 0.091463 | 0.184991 | 0.119537 | 0.585366 | 0.659686 | 0.470437 | 9 | 13.593288 |
| GL2 | 0.940337 | 0.581637 | 0.794062 | 0.095528 | 0.179756 | 0.255784 | 0.510163 | 0.073298 | 0.105398 | 9 | 12.535963 |
| WRKY9 | 0.263193 | 0.154999 | 0.983636 | 0.193089 | 0.467714 | 0.223650 | 0.497967 | 0.256545 | 0.425450 | 9 | 12.466244 |
| TTG2 | 0.905573 | 0.391550 | 0.014513 | 0.193089 | 0.094241 | 0.127249 | 0.422764 | 0.055846 | 0.068123 | 9 | 11.272949 |
| GATA17 | 0.817301 | 0.000162 | 0.316965 | 0.237805 | 0.073298 | 0.332905 | 0.223577 | 0.017452 | 0.132391 | 9 | 11.151855 |
| TRY | 0.727121 | 0.008339 | 0.371758 | 0.199187 | 0.109948 | 0.136247 | 0.290650 | 0.020942 | 0.023136 | 9 | 10.887328 |
| FIT | 0.811816 | 0.000531 | 0.087486 | 0.099593 | 0.097731 | 0.119537 | 0.422764 | 0.118674 | 0.118252 | 9 | 10.876385 |
| CRF4 | 0.705881 | 0.068896 | 0.013112 | 0.134146 | 0.059337 | 0.124679 | 0.315041 | 0.080279 | 0.086118 | 9 | 10.587488 |
| WRKY72 | 0.330754 | 0.293429 | 0.188152 | 0.197154 | 0.040140 | 0.053985 | 0.034553 | 0.078534 | 0.071979 | 9 | 10.288680 |
| OFP18 | 0.674254 | 0.000802 | 0.000374 | 0.101626 | 0.017452 | 0.033419 | 0.223577 | 0.015707 | 0.006427 | 9 | 10.073639 |
| WRKY11 | 0.321796 | 0.000485 | 0.125334 | 0.150407 | 0.022688 | 0.221080 | 0.087398 | 0.022688 | 0.110540 | 9 | 10.062415 |
| OFP15 | 0.326060 | 0.003091 | 0.144207 | 0.063008 | 0.066318 | 0.055270 | 0.085366 | 0.019197 | 0.083548 | 9 | 9.846064 |
| AT2G36026 | 0.232900 | 0.009815 | 0.126164 | 0.052846 | 0.095986 | 0.014139 | 0.123984 | 0.015707 | 0.136247 | 9 | 9.807787 |
| AT3G14740 | 0.154741 | 0.033711 | 0.025035 | 0.134146 | 0.085515 | 0.093830 | 0.111789 | 0.040140 | 0.038560 | 9 | 9.717467 |
## atri, tri
celltype1='atri'
celltype2='tri'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
| atri_betweenness_centrality | tri_betweenness_centrality | atri_out_centrality | tri_out_centrality | atri_in_centrality | tri_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|---|---|---|
| AT3G53370 | 0.879734 | 0.918494 | 0.085366 | 0.321117 | 0.060976 | 0.820244 | 6 | 9.085931 |
| ATMYC1 | 0.509273 | 0.747507 | 0.695122 | 0.218150 | 0.028455 | 0.549738 | 6 | 8.748245 |
| RSL1 | 0.178295 | 0.487674 | 0.640244 | 0.287958 | 0.012195 | 0.179756 | 6 | 7.786121 |
| IAA14 | 0.886464 | 0.000366 | 0.158537 | 0.151832 | 0.207317 | 0.308901 | 6 | 7.713417 |
| EGL3 | 0.064229 | 0.406183 | 0.729675 | 0.202443 | 0.022358 | 0.157068 | 6 | 7.581956 |
| RHD6 | 0.262365 | 0.557668 | 0.205285 | 0.139616 | 0.020325 | 0.350785 | 6 | 7.536044 |
| WRI1 | 0.754682 | 0.001751 | 0.260163 | 0.146597 | 0.164634 | 0.010471 | 6 | 7.338298 |
## Atrichoblast specific
celltype = 'atri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| atri_betweenness_centrality | atri_out_centrality | atri_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| AT1G27050 | 0.006512 | 0.174797 | 0.046748 | 3 | 3.228056 |
| NAC044 | 0.000886 | 0.152439 | 0.020325 | 3 | 3.173650 |
| KAN2 | 0.000604 | 0.140244 | 0.004065 | 3 | 3.144913 |
## Trichoblast specific
celltype = 'tri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| tri_betweenness_centrality | tri_out_centrality | tri_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| WRKY75 | 0.946683 | 0.006981 | 0.083770 | 3 | 4.037433 |
| AT4G09100 | 0.846737 | 0.031414 | 0.043630 | 3 | 3.921780 |
| MED6 | 0.401918 | 0.005236 | 0.090750 | 3 | 3.497904 |
| RSL4 | 0.186181 | 0.017452 | 0.115183 | 3 | 3.318816 |
| PRMT3 | 0.055062 | 0.001745 | 0.001745 | 3 | 3.058553 |
| LRL3 | 0.038312 | 0.001745 | 0.031414 | 3 | 3.071471 |
| AT1G02040 | 0.016997 | 0.029668 | 0.043630 | 3 | 3.090296 |
| AT4G39160 | 0.008973 | 0.024433 | 0.116928 | 3 | 3.150334 |
| MYB47 | 0.004546 | 0.097731 | 0.041885 | 3 | 3.144162 |
| WRKY61 | 0.001303 | 0.008726 | 0.008726 | 3 | 3.018755 |
| RL6 | 0.000433 | 0.047120 | 0.061082 | 3 | 3.108636 |
| AT1G11490 | 0.000296 | 0.041885 | 0.034904 | 3 | 3.077085 |
| AT2G17600 | 0.000146 | 0.054101 | 0.033159 | 3 | 3.087406 |
| AT2G32030 | 0.000012 | 0.050611 | 0.017452 | 3 | 3.068075 |
| WRKY35 | 0.000009 | 0.066318 | 0.059337 | 3 | 3.125664 |
## LRC specific
celltype = 'lrc'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| lrc_betweenness_centrality | lrc_out_centrality | lrc_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| GRF2 | 0.492789 | 0.109254 | 0.084833 | 3 | 3.686877 |
| MIF3 | 0.356946 | 0.024422 | 0.037275 | 3 | 3.418643 |
| AT5G16680 | 0.298771 | 0.007712 | 0.014139 | 3 | 3.320622 |
| AGL94 | 0.152410 | 0.029563 | 0.055270 | 3 | 3.237243 |
| CZF1 | 0.138546 | 0.029563 | 0.116967 | 3 | 3.285076 |
| CRF8 | 0.132505 | 0.030848 | 0.055270 | 3 | 3.218623 |
| HDG2 | 0.106891 | 0.098972 | 0.035990 | 3 | 3.241852 |
| AT4G39780 | 0.104858 | 0.021851 | 0.025707 | 3 | 3.152415 |
| OFP6 | 0.094998 | 0.008997 | 0.146530 | 3 | 3.250525 |
| TCX2 | 0.083117 | 0.106684 | 0.055270 | 3 | 3.245071 |
| AT3G19360 | 0.046808 | 0.111825 | 0.023136 | 3 | 3.181770 |
| AT3G02890 | 0.045533 | 0.041131 | 0.078406 | 3 | 3.165070 |
| WRKY7 | 0.037333 | 0.146530 | 0.034704 | 3 | 3.218567 |
| HDG7 | 0.025543 | 0.061697 | 0.030848 | 3 | 3.118088 |
| TGA7 | 0.023758 | 0.023136 | 0.024422 | 3 | 3.071316 |
| AGL26 | 0.009873 | 0.008997 | 0.011568 | 3 | 3.030438 |
| NLP7 | 0.008526 | 0.010283 | 0.012853 | 3 | 3.031662 |
| CSDP1 | 0.006225 | 0.133676 | 0.089974 | 3 | 3.229875 |
| AT2G41710 | 0.003628 | 0.024422 | 0.042416 | 3 | 3.070466 |
| HDG1 | 0.003474 | 0.079692 | 0.059126 | 3 | 3.142291 |
| WRKY26 | 0.001899 | 0.019280 | 0.008997 | 3 | 3.030177 |
| SR1 | 0.001689 | 0.033419 | 0.047558 | 3 | 3.082666 |
| TFIIIA | 0.001229 | 0.034704 | 0.074550 | 3 | 3.110484 |
| PYE | 0.000734 | 0.047558 | 0.024422 | 3 | 3.072714 |
| AT1G19000 | 0.000657 | 0.025707 | 0.019280 | 3 | 3.045644 |
| CRF11 | 0.000278 | 0.055270 | 0.064267 | 3 | 3.119815 |
| NAC053 | 0.000069 | 0.010283 | 0.016710 | 3 | 3.027062 |
| SNL6 | 0.000066 | 0.037275 | 0.060411 | 3 | 3.097753 |
| CHR1 | 0.000041 | 0.086118 | 0.044987 | 3 | 3.131147 |
| LDL1 | 0.000015 | 0.048843 | 0.024422 | 3 | 3.073280 |
| GATA6 | 0.000002 | 0.132391 | 0.037275 | 3 | 3.169667 |
## Columella specific
celltype = 'col'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| col_betweenness_centrality | col_out_centrality | col_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| KNAT3 | 0.366312 | 0.063197 | 0.061958 | 3 | 3.491467 |
| FBH4 | 0.338893 | 0.016109 | 0.254027 | 3 | 3.609029 |
| WRKY33 | 0.233397 | 0.078067 | 0.104089 | 3 | 3.415553 |
| NTT | 0.004625 | 0.022305 | 0.021066 | 3 | 3.047995 |
| AT5G41020 | 0.002829 | 0.040892 | 0.037175 | 3 | 3.080896 |
| AT5G06110 | 0.001770 | 0.058240 | 0.057001 | 3 | 3.117011 |
| RAP2.1 | 0.001268 | 0.008674 | 0.019827 | 3 | 3.029769 |
| CHR4 | 0.001248 | 0.076828 | 0.063197 | 3 | 3.141273 |
| MYB73 | 0.001239 | 0.003717 | 0.047088 | 3 | 3.052045 |
| ARF8 | 0.001238 | 0.014870 | 0.052045 | 3 | 3.068152 |
| AT2G20110 | 0.001216 | 0.013631 | 0.009913 | 3 | 3.024760 |
| CDC5 | 0.000086 | 0.114002 | 0.035936 | 3 | 3.150024 |
| TOE3 | 0.000051 | 0.042131 | 0.013631 | 3 | 3.055813 |
| AT5G65910 | 0.000037 | 0.018587 | 0.028501 | 3 | 3.047125 |
| RDUF1 | 0.000020 | 0.033457 | 0.133829 | 3 | 3.167306 |
| JMJ18 | 0.000003 | 0.017348 | 0.042131 | 3 | 3.059483 |
## Ground tissue
celltype1='cor'
celltype2='end'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
| cor_betweenness_centrality | end_betweenness_centrality | cor_out_centrality | end_out_centrality | cor_in_centrality | end_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|---|---|---|
| ARR3 | 0.013035 | 0.030588 | 0.336049 | 0.306773 | 0.490835 | 0.864542 | 6 | 8.041822 |
| MYB36 | 0.056428 | 0.013912 | 0.360489 | 0.400398 | 0.048880 | 1.001992 | 6 | 7.882099 |
| MYB3 | 0.009053 | 0.020278 | 0.378819 | 0.372510 | 0.095723 | 0.992032 | 6 | 7.868414 |
| JKD | 0.015333 | 0.014429 | 0.354379 | 0.348606 | 0.596741 | 0.444223 | 6 | 7.773711 |
| MYB68 | 0.000233 | 0.012409 | 0.252546 | 0.308765 | 0.024440 | 0.974104 | 6 | 7.572496 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| AT4G25610 | 0.000254 | 0.000004 | 0.014257 | 0.041833 | 0.010183 | 0.009960 | 6 | 6.076490 |
| RLT1 | 0.000154 | 0.000159 | 0.016293 | 0.035857 | 0.010183 | 0.005976 | 6 | 6.068622 |
| AT3G12130 | 0.000017 | 0.000231 | 0.014257 | 0.041833 | 0.002037 | 0.003984 | 6 | 6.062357 |
| AT3G61420 | 0.000175 | 0.000080 | 0.002037 | 0.011952 | 0.008147 | 0.031873 | 6 | 6.054262 |
| PTM | 0.000050 | 0.000191 | 0.006110 | 0.031873 | 0.008147 | 0.003984 | 6 | 6.050354 |
72 rows × 8 columns
## Cortex specific
celltype = 'cor'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| cor_betweenness_centrality | cor_out_centrality | cor_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| SIGF | 0.010765 | 0.004073 | 0.010183 | 3 | 3.025022 |
| WRKY57 | 0.004181 | 0.004073 | 0.069246 | 3 | 3.077501 |
| HAM2 | 0.002789 | 0.036660 | 0.054990 | 3 | 3.094439 |
| MYB14 | 0.002523 | 0.026477 | 0.134420 | 3 | 3.163419 |
| AT2G42660 | 0.002415 | 0.048880 | 0.232179 | 3 | 3.283474 |
| EIL1 | 0.002365 | 0.016293 | 0.109980 | 3 | 3.128638 |
| TAFII59 | 0.002107 | 0.030550 | 0.006110 | 3 | 3.038767 |
| HMGB2 | 0.001866 | 0.024440 | 0.024440 | 3 | 3.050746 |
| HB16 | 0.001833 | 0.014257 | 0.091650 | 3 | 3.107739 |
| RR2 | 0.001397 | 0.002037 | 0.006110 | 3 | 3.009543 |
| TAFII21 | 0.001343 | 0.018330 | 0.006110 | 3 | 3.025782 |
| HMG | 0.001305 | 0.038697 | 0.065173 | 3 | 3.105175 |
| AT1G68070 | 0.001288 | 0.030550 | 0.034623 | 3 | 3.066462 |
| SIGE | 0.001218 | 0.044807 | 0.146640 | 3 | 3.192664 |
| AT5G63700 | 0.001143 | 0.022403 | 0.158859 | 3 | 3.182406 |
| NAC78 | 0.000960 | 0.004073 | 0.016293 | 3 | 3.021327 |
| GLK2 | 0.000786 | 0.004073 | 0.028513 | 3 | 3.033372 |
| LHW | 0.000711 | 0.061100 | 0.006110 | 3 | 3.067921 |
| BPC6 | 0.000678 | 0.008147 | 0.004073 | 3 | 3.012897 |
| NAC003 | 0.000333 | 0.010183 | 0.073320 | 3 | 3.083836 |
| AT4G28030 | 0.000320 | 0.004073 | 0.079430 | 3 | 3.083823 |
| NFXL2 | 0.000254 | 0.020367 | 0.022403 | 3 | 3.043023 |
| RGL1 | 0.000224 | 0.008147 | 0.002037 | 3 | 3.010408 |
| BNQ3 | 0.000175 | 0.004073 | 0.006110 | 3 | 3.010358 |
| BAM7 | 0.000162 | 0.014257 | 0.010183 | 3 | 3.024602 |
| AT1G67310 | 0.000145 | 0.010183 | 0.010183 | 3 | 3.020512 |
| ZFN3 | 0.000133 | 0.014257 | 0.032587 | 3 | 3.046976 |
| RTV1 | 0.000116 | 0.081466 | 0.028513 | 3 | 3.110096 |
| EPR1 | 0.000096 | 0.028513 | 0.030550 | 3 | 3.059159 |
| TSO1 | 0.000083 | 0.050916 | 0.020367 | 3 | 3.071366 |
| BEH4 | 0.000050 | 0.022403 | 0.059063 | 3 | 3.081516 |
| MYC4 | 0.000037 | 0.010183 | 0.020367 | 3 | 3.030587 |
| B160 | 0.000037 | 0.018330 | 0.012220 | 3 | 3.030587 |
| AT1G04850 | 0.000021 | 0.012220 | 0.030550 | 3 | 3.042791 |
| ATMAK3 | 0.000017 | 0.010183 | 0.002037 | 3 | 3.012237 |
| AT5G47390 | 0.000017 | 0.061100 | 0.042770 | 3 | 3.103886 |
| AT5G28300 | 0.000012 | 0.022403 | 0.038697 | 3 | 3.061112 |
| HAM1 | 0.000008 | 0.014257 | 0.006110 | 3 | 3.020375 |
| JMJ14 | 0.000008 | 0.012220 | 0.006110 | 3 | 3.018338 |
| AT2G43280 | 0.000008 | 0.018330 | 0.006110 | 3 | 3.024448 |
| bHLH34 | 0.000008 | 0.014257 | 0.008147 | 3 | 3.022412 |
| AT3G18960 | 0.000008 | 0.046843 | 0.016293 | 3 | 3.063145 |
| RHC2A | 0.000008 | 0.012220 | 0.016293 | 3 | 3.028522 |
| DBP1 | 0.000008 | 0.016293 | 0.034623 | 3 | 3.050925 |
| SUVR5 | 0.000004 | 0.006110 | 0.006110 | 3 | 3.012224 |
| AT5G12440 | 0.000004 | 0.052953 | 0.006110 | 3 | 3.059067 |
## Endodermis specific
celltype = 'end'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| end_betweenness_centrality | end_out_centrality | end_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| chr31 | 0.026851 | 0.025896 | 0.225100 | 3 | 3.277847 |
| AT2G27930 | 0.010986 | 0.023904 | 0.107570 | 3 | 3.142460 |
| NAC083 | 0.009085 | 0.031873 | 0.179283 | 3 | 3.220241 |
| AT2G45120 | 0.008867 | 0.009960 | 0.061753 | 3 | 3.080580 |
| IAA16 | 0.007960 | 0.021912 | 0.085657 | 3 | 3.115530 |
| ... | ... | ... | ... | ... | ... |
| AT5G26749 | 0.000004 | 0.013944 | 0.007968 | 3 | 3.021916 |
| SPL7 | 0.000004 | 0.025896 | 0.007968 | 3 | 3.033869 |
| CIP8 | 0.000004 | 0.033865 | 0.009960 | 3 | 3.043829 |
| NF-YA1 | 0.000004 | 0.011952 | 0.003984 | 3 | 3.015940 |
| SDG20 | 0.000004 | 0.015936 | 0.003984 | 3 | 3.019924 |
92 rows × 5 columns
## Stele
celltype1='per'
celltype2='pro'
celltype3='xyl'
celltype4='phl'
ts = tf_spec[tf_spec['tf_occurance']==4][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype4+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype4+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality', celltype4+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==12].sort_values(['centrality_count','centrality_sum'], ascending=False)
| per_betweenness_centrality | pro_betweenness_centrality | xyl_betweenness_centrality | phl_betweenness_centrality | per_out_centrality | pro_out_centrality | xyl_out_centrality | phl_out_centrality | per_in_centrality | pro_in_centrality | xyl_in_centrality | phl_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AT3G43430 | 0.148291 | 0.322640 | 0.075969 | 0.056666 | 0.521499 | 0.415318 | 0.246032 | 0.515436 | 0.797133 | 0.996764 | 0.219577 | 0.860403 | 12 | 17.175729 |
| HB-8 | 0.536432 | 0.109958 | 0.712503 | 0.021305 | 0.044101 | 0.190939 | 0.500000 | 0.629530 | 0.027563 | 0.519957 | 0.944444 | 0.014765 | 12 | 16.251499 |
| MYB20 | 0.100236 | 0.053263 | 0.001600 | 0.030719 | 0.489526 | 0.606257 | 0.137566 | 0.633557 | 0.414553 | 0.838188 | 0.417989 | 0.025503 | 12 | 15.748958 |
| MYB43 | 0.182036 | 0.004801 | 0.000372 | 0.041344 | 0.272326 | 0.507012 | 0.116402 | 0.657718 | 0.243660 | 0.549083 | 0.023810 | 0.034899 | 12 | 14.633464 |
| AT1G61660 | 0.111503 | 0.010047 | 0.000379 | 0.028837 | 0.004410 | 0.388350 | 0.050265 | 0.422819 | 0.197354 | 0.817691 | 0.126984 | 0.108725 | 12 | 14.267364 |
| AT1G12440 | 0.001649 | 0.205924 | 0.315173 | 0.001460 | 0.060639 | 0.426106 | 0.261905 | 0.259060 | 0.027563 | 0.139159 | 0.124339 | 0.063087 | 12 | 13.886064 |
| TCP14 | 0.002147 | 0.000037 | 0.002028 | 0.162237 | 0.033076 | 0.132686 | 0.370370 | 0.398658 | 0.016538 | 0.333333 | 0.206349 | 0.175839 | 12 | 13.833299 |
## Pericycle
celltype = 'per'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| per_betweenness_centrality | per_out_centrality | per_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| LBD14 | 0.626412 | 0.192944 | 0.170893 | 3 | 3.990249 |
| AT3G21330 | 0.354888 | 0.477398 | 0.058434 | 3 | 3.890720 |
| SAP | 0.253036 | 0.636163 | 0.020948 | 3 | 3.910147 |
| AT1G27660 | 0.062708 | 0.153252 | 0.146637 | 3 | 3.362598 |
| GATA23 | 0.042362 | 0.119074 | 0.062845 | 3 | 3.224281 |
| AT3G60580 | 0.040281 | 0.130099 | 0.037486 | 3 | 3.207867 |
| ATWHY2 | 0.035955 | 0.051819 | 0.094818 | 3 | 3.182593 |
| NAC001 | 0.033811 | 0.060639 | 0.151047 | 3 | 3.245498 |
| bZIP5 | 0.031200 | 0.101433 | 0.183021 | 3 | 3.315654 |
| WHY1 | 0.018266 | 0.132304 | 0.008820 | 3 | 3.159391 |
| LBD16 | 0.015147 | 0.208379 | 0.366042 | 3 | 3.589568 |
| AT5G13780 | 0.013032 | 0.027563 | 0.039691 | 3 | 3.080287 |
| GRF9 | 0.008439 | 0.023153 | 0.006615 | 3 | 3.038208 |
| IDD11 | 0.005733 | 0.039691 | 0.116869 | 3 | 3.162293 |
| WHY3 | 0.001090 | 0.009923 | 0.013230 | 3 | 3.024244 |
| AT2G20100 | 0.001059 | 0.050717 | 0.122381 | 3 | 3.174157 |
| AT1G63820 | 0.000712 | 0.047409 | 0.058434 | 3 | 3.106555 |
| TRFL10 | 0.000692 | 0.048512 | 0.049614 | 3 | 3.098818 |
| TEM1 | 0.000286 | 0.015436 | 0.091510 | 3 | 3.107232 |
| SAC51 | 0.000002 | 0.018743 | 0.067255 | 3 | 3.086000 |
| NF-YC9 | 0.000002 | 0.098126 | 0.040794 | 3 | 3.138922 |
## Procambium
celltype = 'pro'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| pro_betweenness_centrality | pro_out_centrality | pro_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| AT5G60142 | 0.251327 | 0.011866 | 0.003236 | 3 | 3.266430 |
| AT4G20970 | 0.053128 | 0.021575 | 0.001079 | 3 | 3.075782 |
| HAT3 | 0.029663 | 0.004315 | 0.042071 | 3 | 3.076049 |
| SHY2 | 0.016662 | 0.011866 | 0.074434 | 3 | 3.102962 |
| AT1G32810 | 0.000185 | 0.007551 | 0.002157 | 3 | 3.009894 |
| ABF4 | 0.000104 | 0.011866 | 0.009709 | 3 | 3.021679 |
| MAF1 | 0.000087 | 0.038835 | 0.009709 | 3 | 3.048631 |
| AT-HSFA5 | 0.000059 | 0.022654 | 0.002157 | 3 | 3.024871 |
| AT1G10720 | 0.000040 | 0.024811 | 0.010787 | 3 | 3.035638 |
| SNL1 | 0.000037 | 0.017260 | 0.009709 | 3 | 3.027006 |
| TOC1 | 0.000037 | 0.006472 | 0.009709 | 3 | 3.016219 |
| BZO2H1 | 0.000037 | 0.020496 | 0.009709 | 3 | 3.030242 |
| AT3G11450 | 0.000037 | 0.030205 | 0.009709 | 3 | 3.039951 |
| AT3G62240 | 0.000029 | 0.015102 | 0.009709 | 3 | 3.024840 |
| CHB3 | 0.000029 | 0.026969 | 0.009709 | 3 | 3.036707 |
| NPH4 | 0.000029 | 0.032362 | 0.009709 | 3 | 3.042100 |
| MAF5 | 0.000028 | 0.021575 | 0.009709 | 3 | 3.031312 |
| FES1 | 0.000026 | 0.006472 | 0.002157 | 3 | 3.008656 |
| AIF1 | 0.000019 | 0.025890 | 0.050701 | 3 | 3.076610 |
| AT1G69570 | 0.000014 | 0.010787 | 0.034520 | 3 | 3.045321 |
| AT2G18090 | 0.000014 | 0.057174 | 0.028047 | 3 | 3.085235 |
| OFP1 | 0.000014 | 0.038835 | 0.030205 | 3 | 3.069054 |
| TGA6 | 0.000014 | 0.009709 | 0.002157 | 3 | 3.011880 |
| AT2G19260 | 0.000013 | 0.009709 | 0.003236 | 3 | 3.012958 |
| HB-1 | 0.000012 | 0.038835 | 0.047465 | 3 | 3.086312 |
| HSFA1D | 0.000009 | 0.009709 | 0.002157 | 3 | 3.011876 |
| STH | 0.000009 | 0.022654 | 0.030205 | 3 | 3.052868 |
| TGA4 | 0.000008 | 0.009709 | 0.008630 | 3 | 3.018347 |
| AT2G45460 | 0.000007 | 0.010787 | 0.030205 | 3 | 3.040999 |
| AT2G03470 | 0.000007 | 0.026969 | 0.025890 | 3 | 3.052866 |
| CRF12 | 0.000006 | 0.038835 | 0.022654 | 3 | 3.061494 |
| ATU2AF35A | 0.000006 | 0.052859 | 0.009709 | 3 | 3.062573 |
| AT1G75490 | 0.000005 | 0.006472 | 0.080906 | 3 | 3.087383 |
| WRKY4 | 0.000005 | 0.009709 | 0.019417 | 3 | 3.029131 |
| NTL9 | 0.000005 | 0.030205 | 0.030205 | 3 | 3.060415 |
| WRI4 | 0.000005 | 0.009709 | 0.030205 | 3 | 3.039918 |
| TBP1 | 0.000005 | 0.011866 | 0.007551 | 3 | 3.019422 |
| NAGS1 | 0.000003 | 0.030205 | 0.009709 | 3 | 3.039917 |
| VIP1 | 0.000003 | 0.045307 | 0.009709 | 3 | 3.055020 |
| AT2G23780 | 0.000003 | 0.039914 | 0.010787 | 3 | 3.050705 |
| LBD37 | 0.000002 | 0.016181 | 0.058252 | 3 | 3.074436 |
| MBD5 | 0.000002 | 0.030205 | 0.004315 | 3 | 3.034522 |
| AT2G06025 | 0.000002 | 0.018339 | 0.009709 | 3 | 3.028050 |
| AT1G01640 | 0.000001 | 0.161812 | 0.038835 | 3 | 3.200648 |
| AT5G40710 | 0.000001 | 0.010787 | 0.008630 | 3 | 3.019419 |
| TRB1 | 0.000001 | 0.031284 | 0.010787 | 3 | 3.042072 |
| IDD16 | 0.000001 | 0.008630 | 0.020496 | 3 | 3.029127 |
| AT4G31420 | 0.000001 | 0.045307 | 0.009709 | 3 | 3.055017 |
| AT1G32360 | 0.000001 | 0.011866 | 0.008630 | 3 | 3.020497 |
| HB21 | 0.000001 | 0.049622 | 0.099245 | 3 | 3.148868 |
| PLIM2b | 0.000001 | 0.008630 | 0.023732 | 3 | 3.032364 |
| ELF6 | 0.000001 | 0.009709 | 0.003236 | 3 | 3.012946 |
## Xylem
celltype = 'xyl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| xyl_betweenness_centrality | xyl_out_centrality | xyl_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| AT1G68810 | 0.932915 | 0.558201 | 0.960317 | 3 | 5.451434 |
| VND2 | 0.889296 | 0.169312 | 0.912698 | 3 | 4.971306 |
| HB31 | 0.888622 | 0.206349 | 0.087302 | 3 | 4.182273 |
| MYB46 | 0.784255 | 0.333333 | 0.462963 | 3 | 4.580551 |
| VND7 | 0.781714 | 0.095238 | 0.576720 | 3 | 4.453672 |
| XND1 | 0.671852 | 0.251323 | 0.867725 | 3 | 4.790900 |
| HAT14 | 0.628465 | 0.156085 | 0.857143 | 3 | 4.641692 |
| ETC1 | 0.616276 | 0.079365 | 0.576720 | 3 | 4.272360 |
| AGL58 | 0.572243 | 0.029101 | 0.177249 | 3 | 3.778592 |
| IAA6 | 0.571646 | 0.272487 | 0.857143 | 3 | 4.701276 |
| AT1G68200 | 0.521859 | 0.066138 | 0.235450 | 3 | 3.823446 |
| VND1 | 0.497776 | 0.544974 | 0.656085 | 3 | 4.698834 |
| JLO | 0.442950 | 0.357143 | 0.084656 | 3 | 3.884749 |
| ASL9 | 0.432052 | 0.298942 | 0.119048 | 3 | 3.850041 |
| VND5 | 0.361760 | 0.105820 | 0.542328 | 3 | 4.009908 |
| VND4 | 0.289447 | 0.076720 | 0.589947 | 3 | 3.956114 |
| AT5G03510 | 0.277792 | 0.280423 | 0.113757 | 3 | 3.671972 |
| BZIP49 | 0.270269 | 0.142857 | 0.042328 | 3 | 3.455455 |
| MYB83 | 0.256410 | 0.042328 | 0.423280 | 3 | 3.722019 |
| IAA31 | 0.242404 | 0.335979 | 0.894180 | 3 | 4.472563 |
| MYB25 | 0.183122 | 0.039683 | 0.044974 | 3 | 3.267778 |
| NAC075 | 0.178912 | 0.269841 | 0.611111 | 3 | 4.059864 |
| VND3 | 0.164526 | 0.047619 | 0.904762 | 3 | 4.116907 |
| MYB52 | 0.041212 | 0.335979 | 0.026455 | 3 | 3.403646 |
| NAC010 | 0.030637 | 0.396825 | 0.063492 | 3 | 3.490955 |
| KNAT7 | 0.015775 | 0.261905 | 0.198413 | 3 | 3.476092 |
| TLP2 | 0.014498 | 0.171958 | 0.164021 | 3 | 3.350476 |
| MYB50 | 0.010568 | 0.087302 | 0.251323 | 3 | 3.349192 |
| TCP20 | 0.010568 | 0.066138 | 0.330688 | 3 | 3.407393 |
| BLH3 | 0.007494 | 0.113757 | 0.018519 | 3 | 3.139770 |
| AP3 | 0.006245 | 0.164021 | 0.814815 | 3 | 3.985081 |
| NST1 | 0.005698 | 0.058201 | 0.121693 | 3 | 3.185592 |
| VND6 | 0.005284 | 0.002646 | 0.066138 | 3 | 3.074067 |
| AT4G00940 | 0.005284 | 0.047619 | 0.103175 | 3 | 3.156078 |
| AT1G26610 | 0.005277 | 0.063492 | 0.187831 | 3 | 3.256600 |
| MYB99 | 0.004954 | 0.103175 | 0.137566 | 3 | 3.245695 |
| AT5G18090 | 0.003523 | 0.007937 | 0.034392 | 3 | 3.045851 |
| TCP10 | 0.002646 | 0.148148 | 0.198413 | 3 | 3.349206 |
| LBD31 | 0.002077 | 0.343915 | 0.021164 | 3 | 3.367156 |
| BEL10 | 0.000035 | 0.097884 | 0.007937 | 3 | 3.105855 |
| DOF1 | 0.000021 | 0.156085 | 0.460317 | 3 | 3.616423 |
## Phloem
celltype = 'phl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
| phl_betweenness_centrality | phl_out_centrality | phl_in_centrality | centrality_count | centrality_sum | |
|---|---|---|---|---|---|
| DAR2 | 0.757107 | 0.132886 | 0.855034 | 3 | 4.745026 |
| NAC020 | 0.707076 | 0.048322 | 0.535570 | 3 | 4.290968 |
| HCA2 | 0.668388 | 0.055034 | 0.657718 | 3 | 4.381139 |
| AT2G03500 | 0.667116 | 0.079195 | 0.895302 | 3 | 4.641613 |
| REM22 | 0.576102 | 0.110067 | 0.120805 | 3 | 3.806975 |
| GATA20 | 0.502163 | 0.028188 | 0.280537 | 3 | 3.810888 |
| NAC057 | 0.064336 | 0.102013 | 0.732886 | 3 | 3.899235 |
| AT3G12730 | 0.036159 | 0.083221 | 0.906040 | 3 | 4.025420 |
| AT1G26790 | 0.006888 | 0.069799 | 0.083221 | 3 | 3.159908 |
| BRH1 | 0.001967 | 0.068456 | 0.139597 | 3 | 3.210020 |
| AT5G41380 | 0.001687 | 0.093960 | 0.394631 | 3 | 3.490277 |
| NAC2 | 0.001310 | 0.099329 | 0.251007 | 3 | 3.351645 |
| RMA2 | 0.000832 | 0.175839 | 0.292617 | 3 | 3.469288 |
| CDF3 | 0.000765 | 0.079195 | 0.185235 | 3 | 3.265194 |
| VOZ1 | 0.000687 | 0.102013 | 0.208054 | 3 | 3.310754 |
| DOF2.4 | 0.000233 | 0.103356 | 0.468456 | 3 | 3.572045 |
| DOF6 | 0.000148 | 0.144966 | 0.908725 | 3 | 4.053839 |
gene = 'SHR'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | end_degree_centrality | end_out_centrality | end_in_centrality | end_betweenness_centrality | end_closeness_centrality | end_eigenvector_centrality | per_degree_centrality | per_out_centrality | per_in_centrality | ... | pro_out_centrality | pro_in_centrality | pro_closeness_centrality | pro_eigenvector_centrality | xyl_degree_centrality | xyl_out_centrality | xyl_in_centrality | xyl_betweenness_centrality | xyl_closeness_centrality | xyl_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SHR | 3.0 | 0.179283 | 0.151394 | 0.027888 | 0.000879 | 0.000501 | 0.056736 | 0.367144 | 0.24366 | 0.123484 | ... | 0.100324 | 0.021575 | 0.000384 | 0.046686 | 0.174603 | 0.058201 | 0.116402 | 0.04416 | 0.000484 | 0.04425 |
1 rows × 24 columns
gene = 'BLJ'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | cor_degree_centrality | cor_out_centrality | cor_in_centrality | cor_betweenness_centrality | cor_closeness_centrality | cor_eigenvector_centrality | end_degree_centrality | end_out_centrality | end_in_centrality | end_betweenness_centrality | end_closeness_centrality | end_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BLJ | 2.0 | 0.130346 | 0.095723 | 0.034623 | 0.000021 | 0.000296 | 0.055857 | 0.920319 | 0.135458 | 0.784861 | 0.01771 | 0.000491 | 0.127557 |
gene = 'JKD'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | cor_degree_centrality | cor_out_centrality | cor_in_centrality | cor_betweenness_centrality | cor_closeness_centrality | cor_eigenvector_centrality | end_degree_centrality | end_out_centrality | end_in_centrality | end_betweenness_centrality | end_closeness_centrality | end_eigenvector_centrality | col_degree_centrality | col_out_centrality | col_in_centrality | col_closeness_centrality | col_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JKD | 2.0 | 0.95112 | 0.354379 | 0.596741 | 0.015333 | 0.000348 | 0.143791 | 0.792829 | 0.348606 | 0.444223 | 0.014429 | 0.000572 | 0.110048 | 0.034696 | 0.016109 | 0.018587 | 0.00029 | 0.019235 |
gene = 'RVN'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | cor_degree_centrality | cor_out_centrality | cor_in_centrality | cor_betweenness_centrality | cor_closeness_centrality | cor_eigenvector_centrality | end_degree_centrality | end_out_centrality | end_in_centrality | end_betweenness_centrality | end_closeness_centrality | end_eigenvector_centrality | col_degree_centrality | col_out_centrality | col_in_centrality | col_closeness_centrality | col_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RVN | 2.0 | 0.181263 | 0.11609 | 0.065173 | 0.000004 | 0.000305 | 0.068971 | 0.272908 | 0.189243 | 0.083665 | 0.000095 | 0.000523 | 0.07088 | 0.006196 | 0.004957 | 0.001239 | 0.000201 | 0.005268 |
gene = 'BIB'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | cor_degree_centrality | cor_out_centrality | cor_in_centrality | cor_betweenness_centrality | cor_closeness_centrality | cor_eigenvector_centrality | end_degree_centrality | end_out_centrality | end_in_centrality | end_betweenness_centrality | end_closeness_centrality | end_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BIB | 2.0 | 0.071283 | 0.065173 | 0.00611 | 0.000012 | 0.000276 | 0.040438 | 0.436255 | 0.099602 | 0.336653 | 0.002239 | 0.000459 | 0.089354 |
gene = 'IME'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
gene = 'MYB66'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
gene = 'GL2'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
| tf_occurance | atri_degree_centrality | atri_out_centrality | atri_in_centrality | atri_betweenness_centrality | atri_closeness_centrality | atri_eigenvector_centrality | tri_degree_centrality | tri_out_centrality | tri_in_centrality | tri_betweenness_centrality | tri_closeness_centrality | tri_eigenvector_centrality | lrc_degree_centrality | lrc_out_centrality | lrc_in_centrality | lrc_betweenness_centrality | lrc_closeness_centrality | lrc_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GL2 | 3.0 | 0.605691 | 0.095528 | 0.510163 | 0.940337 | 0.001224 | 0.109614 | 0.253054 | 0.179756 | 0.073298 | 0.581637 | 0.000692 | 0.083733 | 0.361183 | 0.255784 | 0.105398 | 0.794062 | 0.000822 | 0.086665 |
tf_spec.to_csv('TF_GRN_centrality_t1-t3_zscore3.csv', index=True)